package com.niuwa.p2p.opr.utils;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.niuwa.p2p.entity.user.User;

public class SessionUtil {

	/**
	 * 从session取得用户信息
	 * 
	 * @return
	 */
	public static User getSessionUser(){
		 HttpSession  session = ServletActionContext.getRequest().getSession();
		 User user=(User)session.getAttribute("user");
		 return user;
	}
	
}
